package com.txc.books.service;

import com.txc.books.entity.LoanRecords;
import com.txc.books.utils.PageRequest;
import com.txc.books.utils.PageResult;

import java.util.List;

/**
 * @author: XCTANG
 *
 */

public interface ILoanRecordsService {

    List<LoanRecords> findAll();

    void insert(LoanRecords loanRecords);

    void update(LoanRecords loanRecords);

    void delete(Integer id);

    void select(Integer id);

    //对图书名进行模糊查询
    void selectByBookName(String name);

    //对借阅人名模糊查询
    void selectByMemberName(String name);

    //根据借阅开始时间查询
    void selectByTime(String createTime);

    //根据借阅状态查询
    void selectByStauts(Integer loanStauts);

    //分页查询接口
    PageResult findByPager(PageRequest pageRequest);

    //查询可以借阅的图书
    void selectLoan(Integer id);

    //借阅图书
    void borrowBook(LoanRecords loanRecords);

    //归还图书
    void returnBook(LoanRecords loanRecords);

    //查询可以归还的图书
    void selectNoLoan(Integer id);
}
